package com.sukhovilin.patterns.gof.creational.Singleton.doublechecked;

/**
 * hmm...
 * @author Dmitry Sukhovilin
 *
 */
public class Foo {
	private volatile Helper helper = null;

	public Helper getHelper() {
		if (helper == null) {
			synchronized (this) {
				if (helper == null) {
					helper = new Helper();
				}
			}
		}
		return helper;
	}
	
	class Helper {

	}

}
